package com.icart.controller.personInterceptor;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;

@Configuration
public class UserWebMvcConfigurerAdapter extends WebMvcConfigurerAdapter {
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(new UserInterceptor()).addPathPatterns("/custcard/**").excludePathPatterns("/person/personhome").excludePathPatterns("/person/login")
        .excludePathPatterns("/person/logincheck").excludePathPatterns("/person/exitlogin");  //对来自/user/** 这个链接来的请求进行拦截


/*        registry.addInterceptor(new SaleUserInterceptor()).addPathPatterns("/sale/**");*/

    }

}
